#f21010631 徐唯嘉
import cv2
# 视频读取(这个也需要本地运行)
vc = cv2.VideoCapture('视频.mp4')
# 检查是否打开正确
#if vc.isOpened():
#     open, frame = vc.read()
# else:
#     open = False

while open:
    ret, frame = vc.read()
    if frame is None:
       break
    if ret == True:
        gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # 单帧图像处理：图像转为灰度图，当然也可以去掉或转为其它，根据情况而论
        cv2.imshow('result', gray)
        if cv2.waitKey(10) & 0xFF == 27:
            break
vc.release()
cv2.destroyAllWindows()